<template>
  <div class="home-container">
    <el-container>
      <el-header :class="{bg1:!this.$store.state.headState,bg2:this.$store.state.headState}" height="70px">
        <Navigation />
      </el-header>
      <el-main style="padding:0;">
        <Main v-on:listenToChildEvent="showMsgFromChild" />
      </el-main>
      <el-footer style="padding:0;">
        <Footer style="background-color:#000000;" />
      </el-footer>
    </el-container>
    <div class="info hidden-md-and-down">
      <div class="img-logo">
        <img src="../../assets/images/logo/logo1.png" alt="">
      </div>
      <div class="info-ul">
        <a href="#" @mouseover="infoshow.show1 = true" @mouseout="infoshow.show1 = false">
          <div class="item_info" v-show="infoshow.show1" @mouseover="infoshow.show1 = true"
            @mouseout="infoshow.show1 = false">
            <img src="@/assets/images/erweima/weixing_03.jpg" alt="">
            <p>电话：400-13786170099</p>
          </div>
          <span>客服</span>
        </a>
        <a href="#" @mouseenter="infoshow.show2 = true" @mouseleave="infoshow.show2 = false">
          <div class="item_info" v-show="infoshow.show2">
            <img src="@/assets/images/erweima/douyin_03.jpg" alt="">
            <p>抖音号：33295836061</p>
          </div>
          <span>抖音</span>

        </a>
        <a href="#" @mouseenter="infoshow.show3 = true" @mouseleave="infoshow.show3 = false">
          <div class="item_info" v-show="infoshow.show3">
            <img src="@/assets/images/erweima/gongzonghao_03.jpg" alt="">
            <p>公众号</p>
          </div>
          <span> 微信</span>
        </a>
        <a href="#" @mouseenter="infoshow.show4 = true" @mouseleave="infoshow.show4 = false">
          <div class="item_info" v-show="infoshow.show4">
            <p>13786170099 <br />18570069988<br> 陈先生</p>
          </div>
          <span> 电话</span>
        </a>
      </div>
    </div>

  </div>
</template>

<script>
// components

//common
import Navigation from '@/components/common/navigation/Navigation.vue'
import Footer from '@/components/common/footer/Footer.vue'

//Views
import Main from '@/views/home/main/Main.vue'

export default {
  components: {
    Navigation,
    Main,
    Footer
  },
  data () {
    return {
      infoshow: {
        show1: false,
        show2: false,
        show3: false,
        show4: false,
      }
    }
  },
  methods: {
    showMsgFromChild () {

    }
  },
  mounted () {
    this.showMsgFromChild()
  }
}
</script>

<style lang='less' scoped>
.home-container {
  position: relative;
  .el-container {
    position: relative;
    .el-header {
      position: fixed;
      top: 00px;
      z-index: 10000;
      left: 50%;
      transform: translate(-50%, 0%);
      width: 100%;
      display: flex;
      align-items: center;
    }
  }
}

.home-container {
  width: 100%;
  height: 100%;
  // background-color: var(--color-background);
}
// .el-header {
//   background-color: var(--color-background);
// }
.bg1 {
  background-color: #007455;
}
.bg2 {
  background-color: #000;
}
.info {
  width: 80px;
  height: 220px;
  background: #fff;
  position: fixed;
  right: 2%;
  top: 50%;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #000;
  border-radius: 20px;
  .img-logo {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .info-ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    height: 100%;
    padding-bottom: 18px;
    a {
      width: 100%;
      height: 100%;
      text-align: center;
      color: #000;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      .item_info {
        position: absolute;
        width: 200px;
        // height: 150px;
        min-height: 250px;
        // border-radius: 50%;
        background: #fff;
        left: -210px;
        top: -220px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        // overflow: auto;
        padding: 5px 5px;
        img {
          width: 100%;
          height: auto;
          overflow: hidden;
        }
        p {
          word-break: break-all;
        }
      }
      .item_info::after {
        content: "";
        width: 0;
        height: 1px;
        border-width: 16px;
        border-style: solid;
        border-color: transparent transparent transparent #fff;
        font-size: 0;
        line-height: 0;
        position: absolute;
        right: -32px;
        bottom: 0;
      }
    }
    a:hover {
      background: #dfe7e6;
      color: #40836a;
      border-top: 1px solid #c0cfcd;
      border-bottom: 1px solid #c0cfcd;
    }
  }
}
.boss_info {
  position: fixed;
  right: 10%;
  top: 50%;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;

  .item_info {
    width: 100px;
    height: 100px;
    background: #fff;
  }
}
</style>